// ==================================================================================
// Shared Genomics Project MPI Codebase
// Version 1.0 30/04/2010
//
// (c) 2010 University of Manchester all rights reserved
//
// This file is distributed under the GNU General Public License, Version 2.  
// Please see the file COPYING.txt for more details
// ==================================================================================

#ifndef _COPYFILE_H_
#define _COPYFILE_H_

#ifdef __cplusplus
extern "C" {
#endif

/*!
\file
\ingroup	gio
\brief		File Copying
\details	Library uses methods from "windows.h" but could just as easily use the POSIX equivalents.
*/

/*!
\brief Copy and delete a file.
\details The file is only deleted if the copy was successful.
\param [in] from Source filepath
\param [in] to Destination filepath
\return 1 on success, 0 on failure
*/
int copyAndDeleteFile(char *from, char *to);

/*!
\brief Copy a file
\param [in] from Source filepath
\param [in] to Destination filepath
\return 1 on success, 0 on failure
*/
int copyFile(char *from, char *to);

/*!
\brief Delete a file
\details Could use the POSIX unlink() but already using 'Windows.h' for file copying,
\param [in] path Filepath to delete
\return 1 on success, 0 on failure
*/
int deleteFile(char *path);

#ifdef __cplusplus
}
#endif

#endif // _COPYFILE_H_
